package web.action;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;

import ejb.manager.PositionManager;

@ManagedBean
public class PositionAction {
	@EJB
	private PositionManager positionManager;
	
	public String deletePosition(){
		String tmp = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("deleteID");
		Integer id = Integer.parseInt(tmp);
		boolean result = positionManager.deletePosition(id);
		
		if(result) return null;
		else return "error";
	}
}
